The present technique relates to an apparatus and method for processing instructions from a plurality of program threads.
When executing instructions for multiple program threads, there can be periods of time where switching execution from one thread to another may improve overall throughput of instructions through the apparatus. For example, if at a certain point in time a delay may be expected in the processing of one thread, it may beneficial to seek to switch to execution of another thread. It is known for a programmer to use an execution hint instruction to indicate that such a delay is to be expected in connection with the thread in which the execution hint instruction has been added.
In a coarse-grained multithreading system where one particular thread is processed within a processing pipeline at a given time, and certain events such as periodic interrupts may trigger context switching between threads, such an execution hint instruction can be used as an additional trigger to switch context from the current thread to another thread.
However, in more fine-grained multithreading systems, it is possible for instructions from multiple threads to be resident within the pipeline at the same time, without any need for context switching between the threads. It would be desirable to allow performance improvements to be realised within such fine-grained multithreading systems, based on presence of such execution hint instructions.